import * as React from 'react';
import { observer } from 'mobx-react';
import { IBookListProps } from '../stores'
import { List } from 'antd';
import BookModel from '../models/BookModel'

@observer
export default class StarBook extends React.Component<IBookListProps> {
  public render() {
    const bookStore = this.props.bookStore;
    return (
      <div>
        <List
          size="small"
          header={<div>高分图书</div>}
          bordered={false}
          dataSource={bookStore.starBooks}
          renderItem={(book: BookModel) => (<List.Item>[{book.star}星] {book.bookName}</List.Item>)}
        />
      </div>
    );
  }
}
